package com.brzjomo.embraceofthevoid.items;

import com.brzjomo.embraceofthevoid.EmbraceOfTheVoid;
import com.brzjomo.embraceofthevoid.init.ModItems;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class TeleportGemCore extends Item {
    public TeleportGemCore(Settings settings) {
        super(settings);
    }

    @Override
    public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
        // show gem description
        if (stack.isOf(ModItems.TELEPORT_GEM_CORE)) {
            tooltip.add(Text.translatable("item." + EmbraceOfTheVoid.MOD_ID + ".teleport_gem_core" + ".description").formatted(Formatting.WHITE));
            tooltip.add(Text.translatable("item." + EmbraceOfTheVoid.MOD_ID + ".teleport_gem_core" + ".description" + ".2").formatted(Formatting.ITALIC).formatted(Formatting.DARK_GRAY));
        }

        super.appendTooltip(stack, world, tooltip, context);
    }
}
